using OnWork.Admin.DAL.Enum;
using OnWork.Admin.DAL.System;
using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace OnWork.Admin.BLL.System
{
    /// <summary>
    /// 系统用户表
    /// 创建者：chenchao
    /// 电子邮箱：chenhome@qq.com
    /// 创建时间：2024-08-15 16:09
    /// </summary>
    public class SysUserDto
    {
        /// <summary>
        /// 账号
        /// </summary>
        [Required, MaxLength(32)]
        public virtual string Account { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [MaxLength(32)]
        public virtual string RealName { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [MaxLength(32)]
        public string? NickName { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [MaxLength(512)]
        public string? Avatar { get; set; }

        /// <summary>
        /// 性别-男_1、女_2
        /// </summary>
        public GenderEnum Sex { get; set; } = GenderEnum.Male;

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime? Birthday { get; set; }

        /// <summary>
        /// 民族
        /// </summary>
        [MaxLength(32)]
        public string? Nation { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        [MaxLength(16)]
        public string? Phone { get; set; }

        /// <summary>
        /// 证件类型
        /// </summary>
        public CardTypeEnum CardType { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [MaxLength(32)]
        public string? IdCardNum { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [MaxLength(64)]
        public string? Email { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        [MaxLength(256)]
        public string? Address { get; set; }

        /// <summary>
        /// 文化程度
        /// </summary>
        public CultureLevelEnum CultureLevel { get; set; }

        /// <summary>
        /// 政治面貌
        /// </summary>
        [MaxLength(16)]
        public string? PoliticalOutlook { get; set; }

        /// <summary>
        /// 毕业院校
        /// </summary>COLLEGE
        [MaxLength(128)]
        public string? College { get; set; }

        /// <summary>
        /// 办公电话
        /// </summary>
        [MaxLength(16)]
        public string? OfficePhone { get; set; }

        /// <summary>
        /// 紧急联系人
        /// </summary>
        [MaxLength(32)]
        public string? EmergencyContact { get; set; }

        /// <summary>
        /// 紧急联系人电话
        /// </summary>
        [MaxLength(16)]
        public string? EmergencyPhone { get; set; }

        /// <summary>
        /// 紧急联系人地址
        /// </summary>
        [MaxLength(256)]
        public string? EmergencyAddress { get; set; }

        /// <summary>
        /// 个人简介
        /// </summary>
        [MaxLength(512)]
        public string? Introduction { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int OrderNo { get; set; } = 100;

        /// <summary>
        /// 状态
        /// </summary>
        public StatusEnum Status { get; set; } = StatusEnum.Enable;

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(256)]
        public string? Remark { get; set; }

        /// <summary>
        /// 账号类型
        /// </summary>
        public AccountTypeEnum AccountType { get; set; } = AccountTypeEnum.NormalUser;

        /// <summary>
        /// 直属机构Id
        /// </summary>
        public long OrgId { get; set; }

        /// <summary>
        /// 直属机构
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(OrgId))]
        public SysOrg SysOrg { get; set; }

        /// <summary>
        /// 直属主管Id
        /// </summary>
        [SugarColumn(ColumnDescription = "直属主管Id")]
        public long? ManagerUserId { get; set; }

        /// <summary>
        /// 直属主管
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(ManagerUserId))]
        public SysUser ManagerUser { get; set; }

        /// <summary>
        /// 职位Id
        /// </summary>
        public long PosId { get; set; }

        /// <summary>
        /// 职位
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(PosId))]
        public SysPos SysPos { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        [MaxLength(32)]
        public string? JobNum { get; set; }

        /// <summary>
        /// 职级
        /// </summary>
        [MaxLength(32)]
        public string? PosLevel { get; set; }

        /// <summary>
        /// 职称
        /// </summary>
        [MaxLength(32)]
        public string? PosTitle { get; set; }

        /// <summary>
        /// 擅长领域
        /// </summary>
        [MaxLength(32)]
        public string? Expertise { get; set; }

        /// <summary>
        /// 办公区域
        /// </summary>
        [MaxLength(32)]
        public string? OfficeZone { get; set; }

        /// <summary>
        /// 办公室
        /// </summary>
        [MaxLength(32)]
        public string? Office { get; set; }

        /// <summary>
        /// 入职日期
        /// </summary>
        public DateTime? JoinDate { get; set; }

        /// <summary>
        /// 最新登录Ip
        /// </summary>
        [MaxLength(256)]
        public string? LastLoginIp { get; set; }

        /// <summary>
        /// 最新登录地点
        /// </summary>
        [MaxLength(128)]
        public string? LastLoginAddress { get; set; }

        /// <summary>
        /// 最新登录时间
        /// </summary>
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 最新登录设备
        /// </summary>
        [MaxLength(128)]
        public string? LastLoginDevice { get; set; }

        /// <summary>
        /// 电子签名
        /// </summary>
        [MaxLength(512)]
        public string? Signature { get; set; }
    }
}